package com.yi.servicemap.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yi.internalcommon.dto.DicDistrict;
import com.yi.servicemap.mapper.DicDistrictMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class TestController {

    @Autowired
    private DicDistrictMapper districMapper;
    @GetMapping("/test")
    public String test(){
    return "service-map";
    }


    @GetMapping("/test-map")
    public String testMap(){
        LambdaQueryWrapper<DicDistrict> lqw=new LambdaQueryWrapper<>();
        lqw.eq(DicDistrict::getAddressCode,110000);
        List<DicDistrict> dicDistricts = districMapper.selectList(lqw);

        return dicDistricts.toString();
    }
}
